<?php

namespace App\Repositories;

use App\Exceptions\BasicException;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use function Matrix\add;    //引入hash

class VirusPriceRepository {

    /*
     * 获取概率奖池所有总数量
     * @param $param
     * @return bool
     * @throws BasicException
     * */
    public function allTotalNumber() {
        $allTotalNumber =app('model_virus_price')->where(['type'=>2])->sum('count');
        return $allTotalNumber ?? 0;
    }

        /*
     * 产出的金币数量
     * @param $param
     * @return bool
     * @throws BasicException
     * */
    public function allTotalGold() {
        $allTotalGold =app('model_virus_price')->where(['type'=>2])->sum('number');
        return $allTotalGold ?? 0;
    }


}


?>